package com.certificationManager.client;

import com.certificationManager.client.presenter.LoginPresenter;
import com.certificationManager.client.presenter.MainStructurePresenter;
import com.certificationManager.client.presenter.RegistrationPresenter;
import com.certificationManager.client.presenter.RootPresenter;
import com.certificationManager.client.presenter.TopPresenter;
import com.certificationManager.client.view.RootView;
import com.google.gwt.user.client.ui.Widget;
import com.mvp4g.client.annotation.Event;
import com.mvp4g.client.annotation.Events;
import com.mvp4g.client.annotation.Start;
import com.mvp4g.client.event.EventBus;

//start view is the view that will be automatically added to the RootPanel/RootLayoutPanel
@Events( startView = RootView.class )
public interface CMEventBus extends EventBus {

	@Event( handlers = RegistrationPresenter.class )
	public void goToRegistration();

	@Event( handlers = LoginPresenter.class )
	public void goToLogin();
	
	@Event( handlers = {MainStructurePresenter.class, TopPresenter.class} )
	public void goToMainStructure();
	
	@Event( handlers = RootPresenter.class )
	public void changeBody( Widget widget );

	@Start
	@Event( handlers = { RootPresenter.class, LoginPresenter.class } )
	public void start();

}
